package com.sims.action.manager;

import org.springframework.beans.factory.annotation.Autowired;

import com.sims.bean.Student;
import com.sims.bean.Teacher;
import com.sims.service.ManagerService;
import com.sims.util.ActionEnhanced;
import com.sims.util.Constant;

public class ModifyTeacherAction extends ActionEnhanced {
	private Teacher teacher;
	@Autowired
	private ManagerService managerService;
	
	public Teacher getTeacher() {
		return teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	@Override
	public String execute() {
		
		result = managerService.modifyTeacher(teacher);
		if (result.containsKey(Constant.SUCCESS)) {
			return SUCCESS;
		}
		return ERROR;
	}
}
